/**
 * @Author: Bobby
 * @Date: 2022-02-15 13:14:17
 * @LastEditTime: 2022-03-01 10:20:03
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\ve\common\components\baseComs\other\uiTransfer.js
 * @CIMC-V2
 */
import { exInput, exSwitch, exSelect, exRequestData } from '@ve/common/components/extension'
export default {
  VERSION: '20220408',
  type: 'uiTransfer',
  name: '穿梭框',
  icon: 'exchange-box-line',
  svg: 'chuansuokuang',
  //数据别名
  // dataName: 'uiTransfer_data',
  //数据集合 表单 列表等等
  data: {
    requestData: { data: [] },
    formData: [],
  },
  //扩展
  extension: {
    model: exInput('Model', 'transfer_name'),
    label: exInput('标签', '穿梭框'),
    api: exInput('Api接口', ''),
    method: exInput('Method', ''),
    getDataKey: exInput('获取数据Key', ''),
    requestData: exRequestData('自定义参数', []),
    // model: exInput('Model', 'transfer_name'),
    // defaultValue: { value: [] },
    labelField: exInput('label字段', 'label'),
    valueField: exInput('value字段', 'key'),
    leftBtn: exInput('左侧按钮', ''),
    rightBtn: exInput('右侧按钮', ''),
    leftTitle: exInput('左侧标题', '列表 1'),
    rightTitle: exInput('右侧标题', '列表 2'),
    filterable: exSwitch('开启搜索', false),
    targetOrder: exSelect('右侧排序', 'original', [
      {
        value: 'original',
        label: '数据相同顺序',
      },
      {
        value: 'push',
        label: '新加入的排最后',
      },
      {
        value: 'unshift',
        label: '新加入的排最前',
      },
    ]),
    hidden: exSwitch('隐藏', false),
  },
  //交互
  interaction: [],
  dataSourceBind: {
    sourceId: {
      type: 'exGetDataSource',
      name: '组件ID',
      value: {
        type: 1,
        source: [],
      },
    },
    // dataKey: exInput('数据Key', ''),
    label: exInput('显示Key', ''),
    key: exInput('选中Key', ''),
  },
  //条件、逻辑指令
  logicInstruction: [],
}
